package com.feng.dao;

import com.feng.entity.Permission;
import com.feng.entity.User;
import com.feng.vo.PageVo;
import com.feng.vo.UserAddVo;
import com.feng.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 丰
 * @date: 2022/12/7 17:01
 */
public interface UserDao {

    int insert(@Param("user") User user);

    int deleteById(@Param("id") int id);

    int update(@Param("userAddVo") UserAddVo userAddVo);

    List<User> selectAll(@Param("pageVo") PageVo pageVo);

    User findByUsername(@Param("username") String username);

    User checked(@Param("userVo") UserVo userVo);

    Integer addUser(@Param("user") User user);

    int updatePassword(UserVo userVo);

    int deleteAll(@Param("ids") int[] ids);

    int count(PageVo pageVo);

    User selectById(@Param("id") int id);

    List<Permission> getPermissionByUsername(String username);
}
